class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: B = None
        self.q: F = None
        self.p: C = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.x: F = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.w: A = None
        self.z: E = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: C = None
        self.s: C = None
        self.txt = txt

l = A("l")
c = B("c")
b = C("b")
m = D("m")
g = E("g")
f = F("f")
i = G("i")
a = H("a")
j = F("j")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.x: F = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.w: A = None
        self.z: E = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: C = None
        self.s: C = None
        self.txt = txt

l = A("l")
c = B("c")
b = C("b")
m = D("m")
g = E("g")
f = F("f")
i = G("i")
a = H("a")
j = F("j")

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