class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: G = None
        self.w: G = None
        self.r: H = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.w: G = None
        self.s: B = None
        self.r: A = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.z: B = None
        self.y: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.w: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.w: G = None
        self.s: B = None
        self.r: A = None
        self.v: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.z: B = None
        self.y: G = None
        self.x: H = None
        self.txt = txt

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

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

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

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