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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.y: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.r: D = None
        self.s: D = None
        self.y: F = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.y: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.r: D = None
        self.s: D = None
        self.y: F = None
        self.q: D = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

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