class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: I = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: B = None
        self.r: J = None
        self.u: B = None
        self.x: J = None
        self.z: F = None
        self.w: D = None
        self.q: B = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: J = None
        self.r: H = None
        self.s: J = None
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: H = None
        self.u: C = None
        self.v: H = None
        self.r: E = None
        self.o: H = None
        self.y: H = None
        self.p: F = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.p: G = None
        self.z: D = None
        self.q: B = None
        self.txt = txt

l = A("l")
b = B("b")
h = C("h")
c = D("c")
d = E("d")
j = F("j")
n = G("n")
e = H("e")
f = I("f")
m = J("m")

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

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

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: B = None
        self.r: J = None
        self.u: B = None
        self.x: J = None
        self.z: F = None
        self.w: D = None
        self.q: B = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: J = None
        self.r: H = None
        self.s: J = None
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.s: H = None
        self.u: C = None
        self.v: H = None
        self.r: E = None
        self.o: H = None
        self.y: H = None
        self.p: F = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: D = None
        self.p: G = None
        self.z: D = None
        self.q: B = None
        self.txt = txt

l = A("l")
b = B("b")
h = C("h")
c = D("c")
d = E("d")
j = F("j")
n = G("n")
e = H("e")
f = I("f")
m = J("m")

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