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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: D = None
        self.v: A = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.z: A = None
        self.u: B = None
        self.r: E = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: D = None
        self.v: A = None
        self.p: A = None
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.z: A = None
        self.u: B = None
        self.r: E = None
        self.x: D = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

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