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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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