class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: E = None
        self.r: B = None
        self.z: C = None
        self.y: B = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.w: C = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.w: B = None
        self.y: C = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.r: C = None
        self.t: C = None
        self.q: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: A = None
        self.w: C = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: G = None
        self.w: B = None
        self.y: C = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.r: C = None
        self.t: C = None
        self.q: A = None
        self.o: F = None
        self.txt = txt

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

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

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

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