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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

k.o = e
k.v = g
m.z = n
n.o = a
n.v = i
n.q = k
n.x = m
n.p = g
a.w = g
a.s = m
e.x = k
g.t = e
g.r = e
g.w = b
l.t = g
l.r = f
l.x = e
f.t = g
f.r = l
f.x = e
b.t = g
b.r = f
b.x = e
i.o = a
i.v = n
i.q = k
i.x = m
i.p = g
assert l.r.r.t.w.txt == "b"