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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: C = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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