class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: E = None
        self.w: D = None
        self.t: D = None
        self.z: C = None
        self.r: F = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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