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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: I = None
        self.t: J = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: F = None
        self.x: A = None
        self.t: I = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: B = None
        self.p: H = None
        self.w: J = None
        self.o: D = None
        self.y: H = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: I = None
        self.t: J = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: F = None
        self.x: A = None
        self.t: I = None
        self.q: E = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: B = None
        self.p: H = None
        self.w: J = None
        self.o: D = None
        self.y: H = None
        self.z: F = None
        self.txt = txt

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

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

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