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

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.y: E = None
        self.z: G = None
        self.q: I = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: A = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: I = None
        self.y: E = None
        self.z: G = None
        self.q: I = None
        self.o: C = None
        self.txt = txt

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

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

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

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