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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: H = None
        self.q: G = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

k = A("k")
a = B("a")
m = C("m")
l = D("l")
f = E("f")
i = F("i")
n = G("n")
c = H("c")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: H = None
        self.q: G = None
        self.t: E = None
        self.y: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

k = A("k")
a = B("a")
m = C("m")
l = D("l")
f = E("f")
i = F("i")
n = G("n")
c = H("c")

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