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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.u: A = None
        self.x: E = None
        self.txt = txt

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

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

h = A("h")
a = B("a")
k = C("k")
m = D("m")
d = E("d")
n = F("n")
e = D("e")

h.v = d
h.y = d
h.t = m
a.v = e
k.v = n
m.o = n
m.t = e
m.u = h
m.x = d
d.q = k
d.y = e
d.s = n
n.w = d
n.v = d
n.p = k
n.q = a
e.o = n
e.t = m
e.u = h
e.x = d
assert k.v.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: D = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: D = None
        self.u: A = None
        self.x: E = None
        self.txt = txt

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

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

h = A("h")
a = B("a")
k = C("k")
m = D("m")
d = E("d")
n = F("n")
e = D("e")

h.v = d
h.y = d
h.t = m
a.v = e
k.v = n
m.o = n
m.t = e
m.u = h
m.x = d
d.q = k
d.y = e
d.s = n
n.w = d
n.v = d
n.p = k
n.q = a
e.o = n
e.t = m
e.u = h
e.x = d
assert k.v.v.q.txt == "k"