class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: H = None
        self.r: D = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: F = None
        self.u: J = None
        self.q: I = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: G = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: H = None
        self.r: D = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.z: F = None
        self.u: J = None
        self.q: I = None
        self.p: G = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: F = None
        self.txt = txt

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

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

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