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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: H = None
        self.r: H = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: G = None
        self.q: A = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.o: A = None
        self.s: B = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.r: E = None
        self.u: G = None
        self.q: F = None
        self.y: B = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: H = None
        self.r: H = None
        self.w: G = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: G = None
        self.q: A = None
        self.p: A = None
        self.u: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.o: A = None
        self.s: B = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.r: E = None
        self.u: G = None
        self.q: F = None
        self.y: B = None
        self.p: B = None
        self.x: D = None
        self.txt = txt

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

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