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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.p: B = None
        self.s: G = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: C = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.y: E = None
        self.u: F = None
        self.q: C = None
        self.t: D = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

f = A("f")
l = B("l")
b = C("b")
n = D("n")
j = E("j")
c = F("c")
k = G("k")
h = H("h")
e = E("e")

f.x = j
l.p = k
l.z = c
l.o = e
b.y = f
b.r = n
n.q = f
n.z = h
n.p = l
n.s = k
n.o = k
j.u = k
j.v = f
j.q = e
j.r = e
j.p = b
j.o = b
j.x = n
j.z = n
c.q = b
c.x = b
c.w = j
k.y = b
k.p = b
k.v = f
k.s = c
h.p = f
h.z = n
h.t = n
h.y = j
h.u = c
h.o = c
h.q = b
h.v = b
e.u = k
e.v = f
e.q = j
e.r = j
e.p = b
e.o = b
e.x = n
e.z = n
assert h.o.w.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: F = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.p: B = None
        self.s: G = None
        self.o: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: C = None
        self.v: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: D = None
        self.y: E = None
        self.u: F = None
        self.q: C = None
        self.t: D = None
        self.v: C = None
        self.o: F = None
        self.txt = txt

f = A("f")
l = B("l")
b = C("b")
n = D("n")
j = E("j")
c = F("c")
k = G("k")
h = H("h")
e = E("e")

f.x = j
l.p = k
l.z = c
l.o = e
b.y = f
b.r = n
n.q = f
n.z = h
n.p = l
n.s = k
n.o = k
j.u = k
j.v = f
j.q = e
j.r = e
j.p = b
j.o = b
j.x = n
j.z = n
c.q = b
c.x = b
c.w = j
k.y = b
k.p = b
k.v = f
k.s = c
h.p = f
h.z = n
h.t = n
h.y = j
h.u = c
h.o = c
h.q = b
h.v = b
e.u = k
e.v = f
e.q = j
e.r = j
e.p = b
e.o = b
e.x = n
e.z = n
assert h.o.w.p.r.txt == "n"