class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.t: G = None
        self.x: F = None
        self.w: G = None
        self.q: C = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: A = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: C = None
        self.o: F = None
        self.s: G = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.txt = txt

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

g = A("g")
a = B("a")
k = C("k")
c = D("c")
i = E("i")
d = F("d")
l = G("l")

g.s = a
g.p = d
g.x = d
g.t = l
g.w = l
g.q = k
g.u = i
a.p = l
a.u = g
a.w = i
a.q = i
k.o = l
k.q = l
k.z = l
k.y = g
c.x = l
c.y = k
i.p = d
i.o = d
i.y = k
i.s = l
i.z = l
i.t = a
d.s = l
d.x = k
l.y = d
assert l.y.x.y.w.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.t: G = None
        self.x: F = None
        self.w: G = None
        self.q: C = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: A = None
        self.w: E = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: C = None
        self.o: F = None
        self.s: G = None
        self.t: B = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: C = None
        self.txt = txt

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

g = A("g")
a = B("a")
k = C("k")
c = D("c")
i = E("i")
d = F("d")
l = G("l")

g.s = a
g.p = d
g.x = d
g.t = l
g.w = l
g.q = k
g.u = i
a.p = l
a.u = g
a.w = i
a.q = i
k.o = l
k.q = l
k.z = l
k.y = g
c.x = l
c.y = k
i.p = d
i.o = d
i.y = k
i.s = l
i.z = l
i.t = a
d.s = l
d.x = k
l.y = d
assert l.y.x.y.w.y.x.txt == "k"