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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: A = None
        self.z: C = None
        self.x: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.q: G = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: A = None
        self.z: C = None
        self.x: G = None
        self.w: D = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: E = None
        self.q: G = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

k.t = b
k.p = b
k.z = e
k.o = j
k.w = j
n.p = e
n.u = e
n.z = i
n.x = l
n.w = b
n.y = b
i.u = b
i.z = l
b.z = n
b.w = d
b.q = l
b.s = k
b.y = m
d.z = k
j.o = e
m.o = b
m.t = l
m.p = e
m.s = n
m.z = j
l.o = b
l.t = m
l.p = e
l.s = n
l.z = j
e.t = b
e.p = b
e.z = k
e.o = j
e.w = j
assert b.s.p.s.txt == "k"