class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: D = None
        self.u: D = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: D = None
        self.r: I = None
        self.w: J = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.v: E = None
        self.x: J = None
        self.p: E = None
        self.o: A = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.x: C = None
        self.p: F = None
        self.s: I = None
        self.r: J = None
        self.o: F = None
        self.q: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

g = A("g")
h = B("h")
i = C("i")
b = D("b")
e = E("e")
m = F("m")
n = G("n")
c = H("c")
l = I("l")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: I = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: D = None
        self.r: I = None
        self.w: J = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.v: E = None
        self.x: J = None
        self.p: E = None
        self.o: A = None
        self.s: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.x: C = None
        self.p: F = None
        self.s: I = None
        self.r: J = None
        self.o: F = None
        self.q: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: C = None
        self.y: A = None
        self.txt = txt

g = A("g")
h = B("h")
i = C("i")
b = D("b")
e = E("e")
m = F("m")
n = G("n")
c = H("c")
l = I("l")
k = J("k")

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