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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: J = None
        self.p: F = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: I = None
        self.s: J = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: F = None
        self.u: F = None
        self.w: B = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: G = None
        self.u: J = None
        self.v: B = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: B = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: J = None
        self.p: F = None
        self.o: A = None
        self.q: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: I = None
        self.s: J = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: F = None
        self.u: F = None
        self.w: B = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: G = None
        self.u: J = None
        self.v: B = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: B = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

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

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