class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: J = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.y: I = None
        self.x: J = None
        self.p: I = None
        self.r: E = None
        self.u: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.x: J = None
        self.z: G = None
        self.o: A = None
        self.s: C = None
        self.p: A = None
        self.t: I = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: I = None
        self.s: B = None
        self.z: I = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: D = None
        self.q: C = None
        self.v: E = None
        self.w: E = None
        self.y: D = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: F = None
        self.p: B = None
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.q: B = None
        self.v: A = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.y: I = None
        self.x: J = None
        self.p: I = None
        self.r: E = None
        self.u: C = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: E = None
        self.x: J = None
        self.z: G = None
        self.o: A = None
        self.s: C = None
        self.p: A = None
        self.t: I = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: I = None
        self.s: B = None
        self.z: I = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: D = None
        self.q: C = None
        self.v: E = None
        self.w: E = None
        self.y: D = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: F = None
        self.p: B = None
        self.r: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.q: B = None
        self.v: A = None
        self.x: B = None
        self.w: D = None
        self.txt = txt

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

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