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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: J = None
        self.o: H = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.y: H = None
        self.t: C = None
        self.r: D = None
        self.o: A = None
        self.s: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: J = None
        self.o: H = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: C = None
        self.y: H = None
        self.t: C = None
        self.r: D = None
        self.o: A = None
        self.s: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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