class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: D = None
        self.s: D = None
        self.o: H = None
        self.u: I = None
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: I = None
        self.o: J = None
        self.p: J = None
        self.q: E = None
        self.z: J = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.u: H = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: G = None
        self.y: B = None
        self.x: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: I = None
        self.o: J = None
        self.p: J = None
        self.q: E = None
        self.z: J = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: H = None
        self.u: H = None
        self.v: A = None
        self.t: A = None
        self.txt = txt

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

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