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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: C = None
        self.v: D = None
        self.txt = txt

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

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