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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.r: I = None
        self.w: D = None
        self.x: J = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: J = None
        self.o: E = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.o: F = None
        self.y: H = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.r: I = None
        self.w: D = None
        self.x: J = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: J = None
        self.o: E = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.o: F = None
        self.y: H = None
        self.p: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

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