class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

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

l = A("l")
e = B("e")
c = C("c")
g = D("g")
k = E("k")
n = F("n")
h = G("h")
b = F("b")
i = C("i")

l.u = i
l.s = e
e.q = k
e.x = k
e.o = l
e.t = i
e.s = g
c.r = k
c.w = n
c.q = n
c.v = l
c.p = g
c.u = g
c.t = g
g.x = k
g.o = k
k.u = l
k.p = n
n.p = h
h.p = g
h.u = e
h.z = e
b.p = h
i.r = k
i.w = b
i.v = l
i.q = n
i.p = g
i.u = g
i.t = g
assert g.x.p.p.z.o.u.v.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

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

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

l = A("l")
e = B("e")
c = C("c")
g = D("g")
k = E("k")
n = F("n")
h = G("h")
b = F("b")
i = C("i")

l.u = i
l.s = e
e.q = k
e.x = k
e.o = l
e.t = i
e.s = g
c.r = k
c.w = n
c.q = n
c.v = l
c.p = g
c.u = g
c.t = g
g.x = k
g.o = k
k.u = l
k.p = n
n.p = h
h.p = g
h.u = e
h.z = e
b.p = h
i.r = k
i.w = b
i.v = l
i.q = n
i.p = g
i.u = g
i.t = g
assert g.x.p.p.z.o.u.v.s.o.txt == "l"