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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.q: A = None
        self.u: F = None
        self.w: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.q: A = None
        self.u: F = None
        self.w: F = None
        self.s: B = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

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

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