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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: F = None
        self.t: B = None
        self.z: C = None
        self.x: E = None
        self.y: F = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.v: A = None
        self.o: D = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.x: C = None
        self.r: F = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: F = None
        self.t: B = None
        self.z: C = None
        self.x: E = None
        self.y: F = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: D = None
        self.v: A = None
        self.o: D = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: C = None
        self.x: C = None
        self.r: F = None
        self.w: B = None
        self.txt = txt

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

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