class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: F = None
        self.q: F = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

i = A("i")
d = B("d")
c = C("c")
f = D("f")
b = E("b")
l = F("l")
m = G("m")
h = H("h")
j = H("j")
e = C("e")

i.p = c
i.x = l
i.q = l
i.s = l
i.o = d
d.z = h
c.y = e
c.u = i
f.x = d
f.p = d
f.z = l
b.x = h
b.q = j
l.z = i
l.t = f
m.q = e
m.t = e
m.y = d
m.o = i
h.s = f
j.s = f
e.y = c
e.u = i
assert m.o.p.u.s.t.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: F = None
        self.q: F = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

i = A("i")
d = B("d")
c = C("c")
f = D("f")
b = E("b")
l = F("l")
m = G("m")
h = H("h")
j = H("j")
e = C("e")

i.p = c
i.x = l
i.q = l
i.s = l
i.o = d
d.z = h
c.y = e
c.u = i
f.x = d
f.p = d
f.z = l
b.x = h
b.q = j
l.z = i
l.t = f
m.q = e
m.t = e
m.y = d
m.o = i
h.s = f
j.s = f
e.y = c
e.u = i
assert m.o.p.u.s.t.z.z.txt == "i"