class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: C = None
        self.p: F = None
        self.z: F = None
        self.y: B = None
        self.v: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: B = None
        self.u: D = None
        self.z: E = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: B = None
        self.u: D = None
        self.z: E = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

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

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