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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: D = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: F = None
        self.s: I = None
        self.r: J = None
        self.w: C = None
        self.x: F = None
        self.p: F = None
        self.t: D = None
        self.o: H = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: F = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.o: D = None
        self.x: D = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: H = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: D = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.y: F = None
        self.s: I = None
        self.r: J = None
        self.w: C = None
        self.x: F = None
        self.p: F = None
        self.t: D = None
        self.o: H = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: F = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: H = None
        self.o: D = None
        self.x: D = None
        self.q: E = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: H = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

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