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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.t: H = None
        self.x: A = None
        self.r: G = None
        self.y: F = None
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.z: C = None
        self.v: G = None
        self.u: A = None
        self.t: C = None
        self.y: D = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: E = None
        self.t: H = None
        self.x: A = None
        self.r: G = None
        self.y: F = None
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: A = None
        self.z: C = None
        self.v: G = None
        self.u: A = None
        self.t: C = None
        self.y: D = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: E = None
        self.txt = txt

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

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

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