class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.v: C = None
        self.y: G = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.q: E = None
        self.w: A = None
        self.y: G = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: A = None
        self.u: E = None
        self.y: G = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

f = A("f")
j = B("j")
l = C("l")
h = D("h")
g = E("g")
k = F("k")
i = G("i")
m = A("m")

f.s = g
f.q = g
f.r = j
f.v = l
f.y = i
f.x = h
j.r = g
j.q = g
j.s = k
j.w = m
j.y = i
j.o = f
j.x = h
l.r = k
l.s = f
l.w = f
l.u = g
l.t = g
l.y = i
h.o = g
g.u = l
g.t = l
k.o = i
i.o = g
m.s = g
m.q = g
m.r = j
m.v = l
m.y = i
m.x = h
assert l.s.x.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.r: B = None
        self.v: C = None
        self.y: G = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.q: E = None
        self.w: A = None
        self.y: G = None
        self.o: A = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: A = None
        self.u: E = None
        self.y: G = None
        self.w: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

f = A("f")
j = B("j")
l = C("l")
h = D("h")
g = E("g")
k = F("k")
i = G("i")
m = A("m")

f.s = g
f.q = g
f.r = j
f.v = l
f.y = i
f.x = h
j.r = g
j.q = g
j.s = k
j.w = m
j.y = i
j.o = f
j.x = h
l.r = k
l.s = f
l.w = f
l.u = g
l.t = g
l.y = i
h.o = g
g.u = l
g.t = l
k.o = i
i.o = g
m.s = g
m.q = g
m.r = j
m.v = l
m.y = i
m.x = h
assert l.s.x.o.u.txt == "l"