class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: C = None
        self.x: D = None
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

h = A("h")
k = B("k")
l = C("l")
e = D("e")
g = E("g")
m = F("m")
f = B("f")
j = B("j")

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: C = None
        self.x: D = None
        self.v: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

h = A("h")
k = B("k")
l = C("l")
e = D("e")
g = E("g")
m = F("m")
f = B("f")
j = B("j")

h.y = e
h.z = e
h.s = g
h.x = k
k.z = l
k.t = l
k.x = e
k.v = g
k.y = g
l.s = h
l.p = e
l.o = g
e.v = m
e.q = m
e.s = m
e.w = l
g.t = f
g.z = k
g.o = l
g.x = h
g.q = j
g.u = m
m.u = g
m.q = h
f.z = l
f.t = l
f.x = e
f.v = g
f.y = g
j.z = l
j.t = l
j.x = e
j.v = g
j.y = g
assert l.o.t.y.x.z.w.p.txt == "e"