class A:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.r: C = None
        self.v: B = None
        self.w: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.t: A = None
        self.y: F = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

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

l = A("l")
g = B("g")
k = C("k")
a = D("a")
i = E("i")
n = F("n")
c = A("c")
h = A("h")

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.t: A = None
        self.y: F = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.txt = txt

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

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

l = A("l")
g = B("g")
k = C("k")
a = D("a")
i = E("i")
n = F("n")
c = A("c")
h = A("h")

l.y = c
l.o = i
l.r = k
l.v = g
l.w = n
g.s = k
g.r = c
g.t = c
g.z = c
g.y = n
g.o = a
k.s = g
k.o = h
a.w = l
a.z = i
i.x = a
i.t = a
i.y = n
i.u = g
i.s = k
n.s = h
n.z = g
c.y = l
c.o = i
c.r = k
c.v = g
c.w = n
h.y = l
h.o = i
h.r = k
h.v = g
h.w = n
assert k.o.w.s.r.s.s.s.y.txt == "n"