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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: E = None
        self.y: G = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: F = None
        self.r: C = None
        self.t: H = None
        self.y: B = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: E = None
        self.y: G = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: F = None
        self.r: C = None
        self.t: H = None
        self.y: B = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.txt = txt

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

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

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