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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.x: B = None
        self.o: B = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.v: F = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

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

j = A("j")
c = B("c")
h = C("h")
f = D("f")
i = E("i")
g = F("g")
e = G("e")
k = F("k")
a = A("a")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.x: B = None
        self.o: B = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: B = None
        self.v: F = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

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

j = A("j")
c = B("c")
h = C("h")
f = D("f")
i = E("i")
g = F("g")
e = G("e")
k = F("k")
a = A("a")

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