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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.x: E = None
        self.u: A = None
        self.p: C = None
        self.o: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.y: G = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: A = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.x: E = None
        self.u: A = None
        self.p: C = None
        self.o: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: J = None
        self.y: G = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: A = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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