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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.u: C = None
        self.v: A = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.u: F = None
        self.txt = txt

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

h.u = i
h.z = g
h.t = c
h.x = f
i.q = m
c.t = g
m.s = c
m.u = c
m.w = e
m.z = e
m.v = g
m.o = a
a.r = m
a.x = m
a.z = f
d.s = i
d.q = g
d.u = f
g.u = i
g.z = h
g.t = c
g.x = f
f.s = i
f.q = h
f.u = d
e.r = m
e.x = m
e.z = f
assert c.t.u.q.v.z.z.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: A = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: E = None
        self.u: C = None
        self.v: A = None
        self.z: E = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.u: F = None
        self.txt = txt

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

h.u = i
h.z = g
h.t = c
h.x = f
i.q = m
c.t = g
m.s = c
m.u = c
m.w = e
m.z = e
m.v = g
m.o = a
a.r = m
a.x = m
a.z = f
d.s = i
d.q = g
d.u = f
g.u = i
g.z = h
g.t = c
g.x = f
f.s = i
f.q = h
f.u = d
e.r = m
e.x = m
e.z = f
assert c.t.u.q.v.z.z.t.t.t.txt == "c"