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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.w: E = None
        self.o: G = None
        self.r: E = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

j = A("j")
e = B("e")
n = C("n")
b = D("b")
a = E("a")
h = F("h")
d = G("d")
c = A("c")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: A = None
        self.w: E = None
        self.o: G = None
        self.r: E = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

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

j = A("j")
e = B("e")
n = C("n")
b = D("b")
a = E("a")
h = F("h")
d = G("d")
c = A("c")

j.p = c
j.v = a
j.o = e
j.t = h
e.q = d
e.s = n
e.v = h
e.w = a
n.u = c
n.o = c
n.t = c
n.p = b
n.y = j
n.s = e
b.s = c
b.p = d
b.t = e
b.o = e
b.v = n
a.p = d
a.w = d
a.z = d
a.u = j
a.q = b
h.z = b
h.p = b
h.q = c
h.w = a
h.r = a
h.o = d
h.t = j
d.w = e
d.p = b
d.z = h
c.p = j
c.v = a
c.o = e
c.t = h
assert a.u.t.o.w.q.w.w.q.txt == "b"