class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: G = None
        self.z: G = None
        self.s: B = None
        self.w: B = None
        self.o: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.q: F = None
        self.p: C = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.s: J = None
        self.o: J = None
        self.w: C = None
        self.r: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: I = None
        self.o: G = None
        self.u: J = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: J = None
        self.p: F = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.q: F = None
        self.p: C = None
        self.u: E = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: D = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: F = None
        self.s: J = None
        self.o: J = None
        self.w: C = None
        self.r: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: C = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: I = None
        self.o: G = None
        self.u: J = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.o: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: J = None
        self.p: F = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: D = None
        self.txt = txt

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

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