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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.s: I = None
        self.r: A = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: E = None
        self.s: I = None
        self.r: A = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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