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

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

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.s: D = None
        self.p: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: A = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

m = A("m")
d = B("d")
b = C("b")
h = D("h")
k = E("k")
j = F("j")
f = F("f")
e = D("e")
a = A("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: F = None
        self.s: D = None
        self.p: A = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: A = None
        self.o: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

m = A("m")
d = B("d")
b = C("b")
h = D("h")
k = E("k")
j = F("j")
f = F("f")
e = D("e")
a = A("a")

m.t = d
m.z = b
d.u = f
d.t = b
d.r = k
d.q = k
d.v = e
b.y = h
h.y = e
h.s = e
h.u = f
h.w = f
h.p = m
k.u = f
k.w = a
k.o = h
k.y = m
j.z = b
j.q = b
j.o = b
f.z = b
f.q = b
f.o = b
e.y = h
e.s = h
e.u = f
e.p = a
e.w = j
a.t = d
a.z = b
assert e.s.p.t.v.y.y.p.t.t.txt == "b"