class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: F = None
        self.z: A = None
        self.q: B = None
        self.s: C = None
        self.p: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: A = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: D = None
        self.t: E = None
        self.u: A = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: A = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: D = None
        self.t: E = None
        self.u: A = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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