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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.y: B = None
        self.v: A = None
        self.x: I = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: A = None
        self.t: I = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.q: I = None
        self.r: F = None
        self.x: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.y: B = None
        self.v: A = None
        self.x: I = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: A = None
        self.t: I = None
        self.y: H = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: G = None
        self.q: I = None
        self.r: F = None
        self.x: G = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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