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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: B = None
        self.v: D = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: B = None
        self.v: D = None
        self.y: D = None
        self.txt = txt

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

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