class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: G = None
        self.x: G = None
        self.r: D = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: G = None
        self.p: G = None
        self.o: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.p: F = None
        self.r: F = None
        self.y: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: G = None
        self.p: G = None
        self.o: E = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.p: F = None
        self.r: F = None
        self.y: B = None
        self.txt = txt

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

e.w = g
e.v = l
e.x = l
e.r = m
e.z = k
k.x = d
g.r = k
m.w = k
m.p = k
m.u = d
h.v = g
h.y = g
h.o = k
d.t = g
d.v = l
d.p = l
d.x = l
d.o = n
l.o = m
l.s = n
l.p = d
l.r = d
l.y = k
n.v = g
n.y = g
n.o = k
assert k.x.t.r.x.t.r.x.x.txt == "l"