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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: J = None
        self.z: B = None
        self.s: I = None
        self.r: B = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: A = None
        self.o: I = None
        self.r: F = None
        self.z: B = None
        self.s: I = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.u: F = None
        self.w: C = None
        self.r: G = None
        self.s: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: J = None
        self.z: B = None
        self.s: I = None
        self.r: B = None
        self.o: C = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.y: A = None
        self.o: I = None
        self.r: F = None
        self.z: B = None
        self.s: I = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.u: F = None
        self.w: C = None
        self.r: G = None
        self.s: E = None
        self.z: F = None
        self.txt = txt

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

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

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