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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.v: A = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: E = None
        self.r: H = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: D = None
        self.w: D = None
        self.txt = txt

h = A("h")
a = B("a")
f = C("f")
n = D("n")
d = E("d")
i = F("i")
l = G("l")
m = H("m")
j = H("j")

h.p = l
h.o = l
h.v = f
h.u = a
h.t = i
h.q = n
a.y = d
a.x = d
a.w = m
a.v = h
a.o = h
f.w = m
f.o = i
n.z = l
n.s = d
n.x = a
d.q = j
d.p = l
d.x = l
d.u = l
i.t = f
i.u = f
i.s = d
i.r = j
i.v = n
l.o = i
m.z = j
m.o = n
m.w = n
j.z = m
j.o = n
j.w = n
assert a.x.q.o.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: C = None
        self.u: B = None
        self.t: F = None
        self.q: D = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.v: A = None
        self.o: A = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: G = None
        self.x: G = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: E = None
        self.r: H = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: D = None
        self.w: D = None
        self.txt = txt

h = A("h")
a = B("a")
f = C("f")
n = D("n")
d = E("d")
i = F("i")
l = G("l")
m = H("m")
j = H("j")

h.p = l
h.o = l
h.v = f
h.u = a
h.t = i
h.q = n
a.y = d
a.x = d
a.w = m
a.v = h
a.o = h
f.w = m
f.o = i
n.z = l
n.s = d
n.x = a
d.q = j
d.p = l
d.x = l
d.u = l
i.t = f
i.u = f
i.s = d
i.r = j
i.v = n
l.o = i
m.z = j
m.o = n
m.w = n
j.z = m
j.o = n
j.w = n
assert a.x.q.o.z.o.txt == "i"