class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: D = None
        self.s: C = None
        self.u: D = None
        self.w: G = None
        self.y: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.q: A = None
        self.o: G = None
        self.p: B = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: G = None
        self.q: A = None
        self.o: G = None
        self.p: B = None
        self.w: B = None
        self.x: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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