class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.w: E = None
        self.p: F = None
        self.o: G = None
        self.v: E = None
        self.q: E = None
        self.u: F = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.o: A = None
        self.u: G = None
        self.z: B = None
        self.x: G = None
        self.r: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

d = A("d")
e = B("e")
j = C("j")
c = D("c")
b = E("b")
g = F("g")
a = G("a")
n = H("n")
h = G("h")

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

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

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: A = None
        self.o: A = None
        self.u: G = None
        self.z: B = None
        self.x: G = None
        self.r: A = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: C = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

d = A("d")
e = B("e")
j = C("j")
c = D("c")
b = E("b")
g = F("g")
a = G("a")
n = H("n")
h = G("h")

d.z = a
d.o = a
d.w = b
d.v = b
d.q = b
d.p = g
d.u = g
d.t = g
e.y = n
e.u = d
j.o = n
j.x = n
j.v = d
c.s = e
c.z = e
c.q = d
c.o = d
c.r = d
c.u = a
c.x = h
c.v = g
b.q = h
b.v = j
b.s = g
g.p = h
a.u = h
n.y = d
n.p = g
h.u = a
assert n.y.p.p.u.u.u.u.u.txt == "a"