class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: B = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.x: G = None
        self.o: B = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: H = None
        self.p: H = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.z: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.p: G = None
        self.y: B = None
        self.v: C = None
        self.z: B = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: E = None
        self.x: G = None
        self.o: B = None
        self.w: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: H = None
        self.p: H = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: A = None
        self.z: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: A = None
        self.p: G = None
        self.y: B = None
        self.v: C = None
        self.z: B = None
        self.t: G = None
        self.r: B = None
        self.txt = txt

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

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