class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.y: F = None
        self.o: D = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: C = None
        self.w: E = None
        self.t: C = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: E = None
        self.x: C = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

f = A("f")
c = B("c")
j = C("j")
e = D("e")
g = E("g")
m = F("m")
k = E("k")
l = E("l")
n = F("n")
d = A("d")

f.w = l
f.z = e
f.o = e
f.p = e
f.y = n
f.x = c
c.q = g
c.w = g
c.x = e
j.u = k
e.p = c
e.s = j
e.t = j
e.w = l
e.q = f
e.u = d
g.t = c
g.x = c
g.r = j
m.u = n
m.v = n
m.s = l
m.x = j
m.w = c
k.t = c
k.x = c
k.r = j
l.t = c
l.x = c
l.r = j
n.u = m
n.v = m
n.s = k
n.x = j
n.w = c
d.w = g
d.z = e
d.o = e
d.p = e
d.y = m
d.x = c
assert l.r.u.r.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: D = None
        self.y: F = None
        self.o: D = None
        self.p: D = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: C = None
        self.w: E = None
        self.t: C = None
        self.q: A = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: E = None
        self.x: C = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

f = A("f")
c = B("c")
j = C("j")
e = D("e")
g = E("g")
m = F("m")
k = E("k")
l = E("l")
n = F("n")
d = A("d")

f.w = l
f.z = e
f.o = e
f.p = e
f.y = n
f.x = c
c.q = g
c.w = g
c.x = e
j.u = k
e.p = c
e.s = j
e.t = j
e.w = l
e.q = f
e.u = d
g.t = c
g.x = c
g.r = j
m.u = n
m.v = n
m.s = l
m.x = j
m.w = c
k.t = c
k.x = c
k.r = j
l.t = c
l.x = c
l.r = j
n.u = m
n.v = m
n.s = k
n.x = j
n.w = c
d.w = g
d.z = e
d.o = e
d.p = e
d.y = m
d.x = c
assert l.r.u.r.u.t.txt == "c"