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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.v: B = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.s: D = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: F = None
        self.t: C = None
        self.s: C = None
        self.o: A = None
        self.r: C = None
        self.z: B = None
        self.x: G = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.w: E = None
        self.x: G = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

h = A("h")
i = B("i")
f = C("f")
e = D("e")
b = E("b")
c = F("c")
k = G("k")
d = H("d")
a = I("a")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: B = None
        self.v: B = None
        self.u: G = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: I = None
        self.s: D = None
        self.v: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: F = None
        self.t: C = None
        self.s: C = None
        self.o: A = None
        self.r: C = None
        self.z: B = None
        self.x: G = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: E = None
        self.w: E = None
        self.x: G = None
        self.u: H = None
        self.s: A = None
        self.txt = txt

h = A("h")
i = B("i")
f = C("f")
e = D("e")
b = E("b")
c = F("c")
k = G("k")
d = H("d")
a = I("a")
m = J("m")

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