class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: C = None
        self.t: F = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.w: G = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: B = None
        self.u: D = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

g = A("g")
l = B("l")
e = C("e")
d = D("d")
a = E("a")
i = F("i")
j = G("j")
f = B("f")
b = G("b")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: F = None
        self.w: G = None
        self.p: E = None
        self.v: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: B = None
        self.u: D = None
        self.o: B = None
        self.t: E = None
        self.txt = txt

g = A("g")
l = B("l")
e = C("e")
d = D("d")
a = E("a")
i = F("i")
j = G("j")
f = B("f")
b = G("b")
k = F("k")

g.p = j
g.o = e
g.w = e
g.t = k
l.x = g
l.p = b
e.y = k
e.s = i
e.w = j
e.p = a
e.v = a
d.p = k
d.v = g
d.s = g
d.r = e
a.x = j
a.z = e
a.y = g
i.s = e
i.t = g
j.p = e
j.s = l
j.o = l
j.u = d
j.t = a
f.x = g
f.p = b
b.p = e
b.s = f
b.o = f
b.u = d
b.t = a
k.s = e
k.t = g
assert a.x.o.x.o.p.z.s.txt == "i"