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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: E = None
        self.r: D = None
        self.v: A = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.r: C = None
        self.q: D = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: E = None
        self.r: D = None
        self.v: A = None
        self.s: E = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: E = None
        self.r: C = None
        self.q: D = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

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

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