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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.y: G = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: C = None
        self.x: E = None
        self.r: B = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: C = None
        self.o: G = None
        self.x: F = None
        self.v: I = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: E = None
        self.w: J = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.w: J = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.v: D = None
        self.x: B = None
        self.t: A = None
        self.u: H = None
        self.w: H = None
        self.txt = txt

i = A("i")
g = B("g")
c = C("c")
d = D("d")
b = E("b")
a = F("a")
j = G("j")
k = H("k")
n = I("n")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.y: G = None
        self.u: H = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: C = None
        self.x: E = None
        self.r: B = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: C = None
        self.o: G = None
        self.x: F = None
        self.v: I = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: E = None
        self.w: J = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: A = None
        self.w: J = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: C = None
        self.v: D = None
        self.x: B = None
        self.t: A = None
        self.u: H = None
        self.w: H = None
        self.txt = txt

i = A("i")
g = B("g")
c = C("c")
d = D("d")
b = E("b")
a = F("a")
j = G("j")
k = H("k")
n = I("n")
m = J("m")

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