class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: F = None
        self.s: A = None
        self.t: D = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: H = None
        self.o: G = None
        self.v: D = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.v: H = None
        self.o: I = None
        self.q: A = None
        self.w: C = None
        self.y: C = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: F = None
        self.s: A = None
        self.t: D = None
        self.x: B = None
        self.y: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: H = None
        self.o: G = None
        self.v: D = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.v: H = None
        self.o: I = None
        self.q: A = None
        self.w: C = None
        self.y: C = None
        self.r: E = None
        self.t: H = None
        self.txt = txt

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

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