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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

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

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

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

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

k = A("k")
e = B("e")
n = C("n")
i = D("i")
g = E("g")
h = F("h")
b = G("b")
j = H("j")
a = B("a")
m = B("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: A = None
        self.x: C = None
        self.txt = txt

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

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

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

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

k = A("k")
e = B("e")
n = C("n")
i = D("i")
g = E("g")
h = F("h")
b = G("b")
j = H("j")
a = B("a")
m = B("m")

k.z = b
e.u = k
e.x = k
e.z = i
n.v = i
n.r = k
n.s = k
i.z = b
i.s = k
i.x = n
g.s = j
g.u = b
g.q = k
h.y = k
h.v = k
h.z = k
h.t = k
h.x = j
h.p = m
h.s = n
h.o = b
b.p = k
j.p = k
j.t = i
a.u = k
a.x = k
a.z = i
m.u = k
m.x = k
m.z = i
assert j.p.z.p.z.p.z.txt == "b"