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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: G = None
        self.q: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.o: G = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: F = None
        self.u: E = None
        self.s: D = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: G = None
        self.q: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.o: G = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: F = None
        self.u: E = None
        self.s: D = None
        self.w: D = None
        self.t: F = None
        self.txt = txt

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

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

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