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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.w: E = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.w: E = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

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

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

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

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