class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: D = None
        self.z: B = None
        self.s: E = None
        self.t: I = None
        self.r: F = None
        self.x: F = None
        self.y: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.w: B = None
        self.t: I = None
        self.u: E = None
        self.s: J = None
        self.v: E = None
        self.o: J = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.s: F = None
        self.t: H = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.u: F = None
        self.r: F = None
        self.q: C = None
        self.s: J = None
        self.t: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: D = None
        self.t: A = None
        self.w: H = None
        self.r: C = None
        self.o: I = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.w: B = None
        self.t: I = None
        self.u: E = None
        self.s: J = None
        self.v: E = None
        self.o: J = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: C = None
        self.s: F = None
        self.t: H = None
        self.q: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.u: F = None
        self.r: F = None
        self.q: C = None
        self.s: J = None
        self.t: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: D = None
        self.t: A = None
        self.w: H = None
        self.r: C = None
        self.o: I = None
        self.z: B = None
        self.s: G = None
        self.txt = txt

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

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