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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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