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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.x: E = None
        self.t: H = None
        self.o: D = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.u: A = None
        self.y: B = None
        self.r: H = None
        self.x: F = None
        self.p: B = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: H = None
        self.r: C = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: E = None
        self.u: C = None
        self.w: B = None
        self.x: D = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.w: A = None
        self.o: D = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.v: E = None
        self.p: C = None
        self.o: H = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: A = None
        self.x: E = None
        self.t: H = None
        self.o: D = None
        self.z: A = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.u: A = None
        self.y: B = None
        self.r: H = None
        self.x: F = None
        self.p: B = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: H = None
        self.r: C = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: E = None
        self.u: C = None
        self.w: B = None
        self.x: D = None
        self.o: H = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.w: A = None
        self.o: D = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.v: E = None
        self.p: C = None
        self.o: H = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

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

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

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