class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.w: A = None
        self.t: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: E = None
        self.u: C = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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