class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: D = None
        self.q: D = None
        self.o: E = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: G = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: B = None
        self.u: D = None
        self.p: D = None
        self.v: G = None
        self.x: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.r: F = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.u: F = None
        self.p: E = None
        self.s: E = None
        self.r: C = None
        self.q: F = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.y: F = None
        self.p: A = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: G = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: B = None
        self.u: D = None
        self.p: D = None
        self.v: G = None
        self.x: F = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.z: C = None
        self.r: F = None
        self.q: F = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.u: F = None
        self.p: E = None
        self.s: E = None
        self.r: C = None
        self.q: F = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.y: F = None
        self.p: A = None
        self.u: C = None
        self.t: C = None
        self.txt = txt

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

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