class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: E = None
        self.p: C = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: H = None
        self.o: F = None
        self.p: A = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: D = None
        self.r: I = None
        self.x: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.z: B = None
        self.p: H = None
        self.y: C = None
        self.v: B = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: C = None
        self.w: I = None
        self.t: A = None
        self.p: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: I = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: G = None
        self.o: E = None
        self.r: F = None
        self.w: B = None
        self.t: I = None
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: H = None
        self.o: F = None
        self.p: A = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: D = None
        self.r: I = None
        self.x: J = None
        self.s: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.z: B = None
        self.p: H = None
        self.y: C = None
        self.v: B = None
        self.t: B = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: C = None
        self.w: I = None
        self.t: A = None
        self.p: H = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: I = None
        self.q: D = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: G = None
        self.o: E = None
        self.r: F = None
        self.w: B = None
        self.t: I = None
        self.y: D = None
        self.p: B = None
        self.txt = txt

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

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

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

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