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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: G = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: G = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: B = None
        self.txt = txt

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

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

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

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