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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: F = None
        self.u: A = None
        self.v: H = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.t: F = None
        self.z: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: F = None
        self.u: A = None
        self.v: H = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: H = None
        self.t: F = None
        self.z: H = None
        self.txt = txt

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

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

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