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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: F = None
        self.x: E = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.p: D = None
        self.o: C = None
        self.x: C = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: F = None
        self.x: E = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: A = None
        self.p: D = None
        self.o: C = None
        self.x: C = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

h.o = f
h.z = i
m.x = f
m.r = n
m.o = e
f.p = e
f.z = e
f.x = h
f.u = j
f.t = m
b.p = e
b.s = e
b.x = n
b.o = j
b.v = f
n.q = i
n.t = h
n.p = b
n.o = j
n.x = j
n.r = g
i.p = g
g.o = j
g.z = i
a.p = i
a.s = e
a.x = n
a.o = j
a.v = j
j.p = e
j.z = e
j.x = h
j.u = f
j.t = m
e.p = h
assert i.p.o.p.p.z.p.o.t.x.u.txt == "j"