class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.s: G = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: A = None
        self.x: D = None
        self.v: D = None
        self.u: D = None
        self.r: B = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.s: D = None
        self.y: D = None
        self.q: E = None
        self.p: E = None
        self.t: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: F = None
        self.s: G = None
        self.q: G = None
        self.y: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: A = None
        self.x: D = None
        self.v: D = None
        self.u: D = None
        self.r: B = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: B = None
        self.s: D = None
        self.y: D = None
        self.q: E = None
        self.p: E = None
        self.t: G = None
        self.txt = txt

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

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