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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

a = A("a")
l = B("l")
f = C("f")
k = D("k")
b = E("b")
m = F("m")
j = G("j")
d = B("d")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

a = A("a")
l = B("l")
f = C("f")
k = D("k")
b = E("b")
m = F("m")
j = G("j")
d = B("d")

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