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

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

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

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

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

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

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

i.t = n
i.r = a
i.u = a
b.v = h
f.z = b
f.v = a
f.o = m
f.x = e
f.q = d
d.o = i
d.w = e
a.w = d
a.y = h
n.z = a
n.v = i
n.u = f
n.p = b
n.y = e
m.z = b
m.v = a
m.o = f
m.x = i
m.q = d
e.t = n
e.r = a
e.u = a
h.z = b
h.v = a
h.o = m
h.x = e
h.q = d
assert i.t.z.w.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

i.t = n
i.r = a
i.u = a
b.v = h
f.z = b
f.v = a
f.o = m
f.x = e
f.q = d
d.o = i
d.w = e
a.w = d
a.y = h
n.z = a
n.v = i
n.u = f
n.p = b
n.y = e
m.z = b
m.v = a
m.o = f
m.x = i
m.q = d
e.t = n
e.r = a
e.u = a
h.z = b
h.v = a
h.o = m
h.x = e
h.q = d
assert i.t.z.w.w.t.txt == "n"