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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.w: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: H = None
        self.w: H = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.s: E = None
        self.txt = txt

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

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