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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.z: C = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.z: C = None
        self.r: D = None
        self.y: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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