class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.r: B = None
        self.u: F = None
        self.y: B = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.s: A = None
        self.r: H = None
        self.v: H = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.r: D = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

l = A("l")
a = B("a")
k = C("k")
j = D("j")
d = E("d")
h = F("h")
i = G("i")
b = H("b")

l.x = b
l.t = a
l.r = a
l.y = a
l.s = a
l.u = h
l.v = i
a.o = j
a.x = i
a.s = l
a.r = b
a.v = b
a.y = d
k.v = j
j.p = l
d.t = i
d.u = h
h.w = k
h.v = k
h.x = d
i.v = l
i.y = l
i.x = b
i.r = j
i.q = k
b.t = j
b.s = h
assert k.v.p.x.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.r: B = None
        self.u: F = None
        self.y: B = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.s: A = None
        self.r: H = None
        self.v: H = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: H = None
        self.r: D = None
        self.y: A = None
        self.q: C = None
        self.txt = txt

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

l = A("l")
a = B("a")
k = C("k")
j = D("j")
d = E("d")
h = F("h")
i = G("i")
b = H("b")

l.x = b
l.t = a
l.r = a
l.y = a
l.s = a
l.u = h
l.v = i
a.o = j
a.x = i
a.s = l
a.r = b
a.v = b
a.y = d
k.v = j
j.p = l
d.t = i
d.u = h
h.w = k
h.v = k
h.x = d
i.v = l
i.y = l
i.x = b
i.r = j
i.q = k
b.t = j
b.s = h
assert k.v.p.x.t.p.txt == "l"