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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: I = None
        self.r: J = None
        self.s: G = None
        self.y: E = None
        self.t: E = None
        self.x: C = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.u: J = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: D = None
        self.q: G = None
        self.v: G = None
        self.z: A = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: I = None
        self.s: F = None
        self.t: B = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.y: F = None
        self.u: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: I = None
        self.r: J = None
        self.s: G = None
        self.y: E = None
        self.t: E = None
        self.x: C = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.u: J = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: D = None
        self.q: G = None
        self.v: G = None
        self.z: A = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: I = None
        self.s: F = None
        self.t: B = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: H = None
        self.y: F = None
        self.u: H = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: A = None
        self.txt = txt

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

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