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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.s: C = None
        self.y: G = None
        self.p: G = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.z: A = None
        self.t: H = None
        self.o: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: D = None
        self.o: G = None
        self.u: G = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: F = None
        self.s: C = None
        self.y: G = None
        self.p: G = None
        self.q: G = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: F = None
        self.z: A = None
        self.t: H = None
        self.o: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: D = None
        self.o: G = None
        self.u: G = None
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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