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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: A = None
        self.t: H = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: B = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: A = None
        self.t: H = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: B = None
        self.txt = txt

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

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

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