class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: J = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.q: B = None
        self.z: G = None
        self.t: G = None
        self.p: G = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: J = None
        self.v: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: E = None
        self.q: B = None
        self.z: G = None
        self.t: G = None
        self.p: G = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

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

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