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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.t: A = None
        self.s: D = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

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

e.w = m
e.x = a
e.u = f
e.p = f
e.o = l
m.q = l
h.v = k
b.o = i
l.q = h
l.o = f
l.x = m
l.t = b
f.w = k
f.y = a
f.t = e
f.v = e
f.s = b
f.x = b
k.t = b
a.q = h
a.o = f
a.x = m
a.t = b
i.v = k
assert k.t.o.v.t.o.v.t.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: E = None
        self.u: F = None
        self.p: F = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: E = None
        self.t: A = None
        self.s: D = None
        self.v: A = None
        self.x: D = None
        self.txt = txt

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

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

e.w = m
e.x = a
e.u = f
e.p = f
e.o = l
m.q = l
h.v = k
b.o = i
l.q = h
l.o = f
l.x = m
l.t = b
f.w = k
f.y = a
f.t = e
f.v = e
f.s = b
f.x = b
k.t = b
a.q = h
a.o = f
a.x = m
a.t = b
i.v = k
assert k.t.o.v.t.o.v.t.o.v.txt == "k"