class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.t: G = None
        self.p: B = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.w: A = None
        self.y: A = None
        self.u: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.p: H = None
        self.r: F = None
        self.w: J = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: F = None
        self.w: A = None
        self.y: A = None
        self.u: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.p: H = None
        self.r: F = None
        self.w: J = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: D = None
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

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

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