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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.o: F = None
        self.s: I = None
        self.p: G = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: E = None
        self.v: C = None
        self.x: A = None
        self.q: E = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.o: F = None
        self.s: I = None
        self.p: G = None
        self.r: C = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: E = None
        self.v: C = None
        self.x: A = None
        self.q: E = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

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