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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

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

k = A("k")
f = B("f")
g = C("g")
e = D("e")
d = E("d")
a = F("a")
i = G("i")
j = G("j")
n = D("n")
l = G("l")

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

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

k = A("k")
f = B("f")
g = C("g")
e = D("e")
d = E("d")
a = F("a")
i = G("i")
j = G("j")
n = D("n")
l = G("l")

k.p = i
f.w = k
f.x = k
f.p = j
f.u = j
f.s = e
g.r = k
e.v = d
e.y = d
d.r = k
d.s = l
d.z = f
d.t = f
d.y = i
a.t = n
a.q = k
a.s = g
a.u = j
i.s = n
i.o = k
i.y = l
i.u = j
j.s = e
j.o = k
j.y = l
j.u = i
n.v = d
n.y = d
l.s = n
l.o = k
l.y = j
l.u = i
assert f.s.y.s.o.p.s.y.s.txt == "l"