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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: A = None
        self.r: A = None
        self.o: H = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: E = None
        self.u: E = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: A = None
        self.r: A = None
        self.o: H = None
        self.q: A = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: E = None
        self.u: E = None
        self.o: H = None
        self.r: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: C = None
        self.txt = txt

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

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