class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: D = None
        self.t: F = None
        self.x: F = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

j = A("j")
b = B("b")
e = C("e")
m = D("m")
l = E("l")
a = F("a")
d = B("d")
f = F("f")
h = E("h")

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

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

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

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

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

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

j = A("j")
b = B("b")
e = C("e")
m = D("m")
l = E("l")
a = F("a")
d = B("d")
f = F("f")
h = E("h")

j.z = l
j.v = l
j.p = m
j.t = f
j.x = a
b.p = a
b.x = h
b.q = e
b.o = f
b.w = d
e.r = j
e.s = j
e.u = j
e.y = d
e.x = m
e.z = m
m.v = e
m.o = f
l.o = f
l.y = e
l.x = b
a.t = e
a.p = e
a.u = f
a.o = f
a.s = d
d.p = f
d.x = l
d.q = e
d.o = a
d.w = b
f.t = e
f.p = e
f.u = a
f.o = a
f.s = d
h.o = a
h.y = e
h.x = d
assert h.o.s.p.o.s.w.o.s.txt == "d"