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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: A = None
        self.w: E = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: B = None
        self.v: C = None
        self.p: C = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: A = None
        self.w: E = None
        self.t: F = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: B = None
        self.v: C = None
        self.p: C = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: A = None
        self.t: A = None
        self.txt = txt

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

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

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

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