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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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