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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.t: B = None
        self.y: G = None
        self.x: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: H = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.t: B = None
        self.y: G = None
        self.x: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: H = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

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

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