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

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

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

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

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

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

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

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

k.o = b
k.w = b
k.s = a
k.q = m
b.o = l
b.t = h
b.v = k
b.y = n
b.q = n
h.z = m
h.v = l
h.w = l
h.s = a
h.o = n
m.t = h
m.s = k
n.s = k
n.y = l
l.x = n
l.s = h
l.r = m
a.z = e
a.t = b
a.v = m
e.z = a
e.t = b
e.v = m
assert l.x.s.q.t.s.t.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.s: G = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

k.o = b
k.w = b
k.s = a
k.q = m
b.o = l
b.t = h
b.v = k
b.y = n
b.q = n
h.z = m
h.v = l
h.w = l
h.s = a
h.o = n
m.t = h
m.s = k
n.s = k
n.y = l
l.x = n
l.s = h
l.r = m
a.z = e
a.t = b
a.v = m
e.z = a
e.t = b
e.v = m
assert l.x.s.q.t.s.t.y.y.txt == "l"