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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

n.s = k
j.z = b
j.r = b
j.s = e
j.t = k
b.u = e
b.q = k
l.s = e
l.w = b
l.p = k
c.p = j
a.w = b
a.t = k
a.y = j
a.q = j
k.o = d
k.y = c
e.u = b
e.q = k
d.p = j
assert c.p.s.u.q.y.p.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: C = None
        self.p: G = None
        self.txt = txt

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

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

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

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

n.s = k
j.z = b
j.r = b
j.s = e
j.t = k
b.u = e
b.q = k
l.s = e
l.w = b
l.p = k
c.p = j
a.w = b
a.t = k
a.y = j
a.q = j
k.o = d
k.y = c
e.u = b
e.q = k
d.p = j
assert c.p.s.u.q.y.p.s.q.txt == "k"