class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.r: F = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.t: H = None
        self.p: C = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.q: G = None
        self.z: C = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.s: E = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

h = A("h")
n = B("n")
i = C("i")
e = D("e")
k = E("k")
l = F("l")
f = G("f")
m = H("m")
d = A("d")

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: C = None
        self.t: H = None
        self.p: C = None
        self.s: E = None
        self.u: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: E = None
        self.q: G = None
        self.z: C = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.s: E = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

h = A("h")
n = B("n")
i = C("i")
e = D("e")
k = E("k")
l = F("l")
f = G("f")
m = H("m")
d = A("d")

h.u = f
h.s = i
h.r = l
h.p = n
n.v = m
n.t = m
n.q = i
n.p = i
n.s = k
n.u = k
i.x = k
i.r = h
e.x = m
k.y = h
k.x = m
k.w = n
k.t = n
k.p = n
k.q = f
k.v = l
l.v = n
l.w = n
l.y = k
l.q = f
l.z = i
l.p = i
f.r = k
f.s = i
f.y = i
f.v = n
f.x = e
f.p = d
m.r = h
m.z = k
m.s = k
m.t = l
m.p = l
d.u = f
d.s = i
d.r = l
d.p = n
assert h.r.q.v.u.txt == "k"