class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.v: J = None
        self.u: G = None
        self.s: F = None
        self.p: F = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: E = None
        self.r: I = None
        self.w: I = None
        self.y: I = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.w: J = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: A = None
        self.v: J = None
        self.u: G = None
        self.s: F = None
        self.p: F = None
        self.t: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: E = None
        self.r: I = None
        self.w: I = None
        self.y: I = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.s: F = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: G = None
        self.w: J = None
        self.z: B = None
        self.txt = txt

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

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

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