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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.p: F = None
        self.o: B = None
        self.v: H = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.p: F = None
        self.o: B = None
        self.v: H = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: G = None
        self.txt = txt

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

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