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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: D = None
        self.txt = txt

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

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

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

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

h.w = l
h.p = l
h.o = l
d.s = j
e.z = a
l.v = h
a.z = j
a.r = l
j.x = a
j.y = e
c.s = h
c.x = d
c.v = d
k.v = c
k.o = j
k.u = e
k.w = a
i.v = c
i.o = j
i.u = e
i.w = a
assert e.z.z.x.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: D = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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