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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: I = None
        self.o: I = None
        self.x: D = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.u: I = None
        self.w: E = None
        self.z: C = None
        self.v: J = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: J = None
        self.q: H = None
        self.o: C = None
        self.z: J = None
        self.u: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.v: E = None
        self.x: H = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.s: J = None
        self.u: D = None
        self.t: J = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: I = None
        self.o: I = None
        self.x: D = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.u: I = None
        self.w: E = None
        self.z: C = None
        self.v: J = None
        self.r: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: J = None
        self.q: H = None
        self.o: C = None
        self.z: J = None
        self.u: F = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: C = None
        self.v: E = None
        self.x: H = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.s: J = None
        self.u: D = None
        self.t: J = None
        self.z: G = None
        self.txt = txt

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

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

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

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