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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.u: D = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: D = None
        self.s: F = None
        self.r: D = None
        self.z: H = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.z: A = None
        self.x: D = None
        self.t: A = None
        self.w: D = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.q: H = None
        self.r: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: E = None
        self.u: D = None
        self.s: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: D = None
        self.s: F = None
        self.r: D = None
        self.z: H = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.z: A = None
        self.x: D = None
        self.t: A = None
        self.w: D = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.q: H = None
        self.r: C = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: G = None
        self.txt = txt

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

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