class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.s: G = None
        self.r: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.q: D = None
        self.v: G = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

j.p = f
j.v = l
j.q = l
j.s = k
j.r = h
l.o = i
l.t = e
l.v = a
l.z = a
l.p = h
l.s = m
m.t = h
m.w = l
h.q = k
h.p = a
h.s = j
a.o = j
i.o = k
i.v = k
i.t = m
i.q = e
i.w = l
k.y = m
e.q = k
e.p = a
e.s = j
f.o = k
f.v = k
f.t = m
f.q = e
f.w = l
assert h.q.y.w.s.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.s: G = None
        self.r: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.q: D = None
        self.v: G = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

j.p = f
j.v = l
j.q = l
j.s = k
j.r = h
l.o = i
l.t = e
l.v = a
l.z = a
l.p = h
l.s = m
m.t = h
m.w = l
h.q = k
h.p = a
h.s = j
a.o = j
i.o = k
i.v = k
i.t = m
i.q = e
i.w = l
k.y = m
e.q = k
e.p = a
e.s = j
f.o = k
f.v = k
f.t = m
f.q = e
f.w = l
assert h.q.y.w.s.w.t.txt == "e"