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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: C = None
        self.w: E = None
        self.o: C = None
        self.txt = txt

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

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