class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: F = None
        self.s: E = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: A = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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