class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: C = None
        self.r: C = None
        self.w: D = None
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: C = None
        self.r: C = None
        self.w: D = None
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

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

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